//package com.yue.lin.config;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
//
//@Configuration
//public class CacheConfig extends WebMvcConfigurerAdapter {
//    /**
//     * <p>设置静态资源缓存时间:30天</p>
//     * <p>注意:不可缓存入口文件</p>
//     *
//     * @param registry 资源注册
//     */
//    @Override
//    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//        registry.addResourceHandler("/js/**", "/css/**", "/img/**", "/font/**", "**.js", "**.css", "**.html")
////        registry.addResourceHandler("/**")
//                .addResourceLocations("classpath:/static/")
//                //.setCacheControl(CacheControl.maxAge(30,TimeUnit.DAYS).cachePublic())
//                .setCachePeriod(2592000);
//    }
//}